package com.bauer.java.activiti.task;

import org.activiti.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Component;

/**
 * 用表达式方式去调用无需继承
 * activiti:expression="#{returnValueTask.check(2,execution)}"
 */
@Component("returnValueTask")
public class ReturnValueTask {

    public  boolean check(String param,DelegateExecution execution){
        System.out.println("executionParam: "+execution.getVariable("var1")+"param:"+param);
        if ("1".equals(param)){
            return false;
        }
        return true;
    }
}
